html {
  font-size: 48px;
  --iphone-black-bg: #000;
  --iphone-black-text: #f2f2f2;

  --iphone-white-bg: #fff;
  --iphone-white-text: #8b8b99;
  --iphone-white-text-highlight: #1d1d1f;

  --iphone-red-bg: #960b19;
  --iphone-red-text: #e57571;
  --iphone-red-text-highlight: #f5f5f7;

  --iphone-width: 460px;
  --iphone-offscreen: -720px;
}
body {
  margin: 0;
  padding: 0;
}

.homepod-container {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
}

.description {
  width: 490px;
  padding: 80px 50px;
  box-sizing: border-box;
  background-color: rgba(0, 0, 0, 0.8);
  border-radius: 20px;
  text-align: center;
  color: #fff;
  margin: 0 auto 100vh;
}

.description h3 {
  font-size: 32px;
  margin: 0;
  padding: 0;
}

.description p {
  font-size: 18px;
  margin: 12px 0 0;
}

.homepod {
  width: 654px;
  height: 825px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.homepod div {
  width: inherit;
  height: inherit;
  background-size: contain;
  background-position: center center;
  position: absolute;
  top: 0;
  left: 0;
}

.start {
  background-image: url(homepod.webp);
}

.part-1 {
  background-image: url(homepod_1.webp);
  opacity: var(--part-1);
}

.part-2 {
  background-image: url(homepod_2.jpg);
  opacity: var(--part-2);
}

.part-3 {
  background-image: url(homepod_3.jpg);
  opacity: var(--part-3);
}

.part-4 {
  background-image: url(homepod_4.jpg);
  opacity: var(--part-4);
}

.ending {
  background-image: url(homepod.webp);
  opacity: var(--ending);
}

.description-container {
  padding-bottom: 100vh;
}

.description:last-child {
  margin-bottom: 0;
}

/* 颜色切换部分 */
.other-section {
  background-color: black;
  height: 3530px;
}
.sticky-container {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}
.sticky-container .iphone {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
}
.sticky-container .iphone h3 {
  width: var(--iphone-width);
  font-size: 1rem;
  margin: 0 0 60px 0;
}
.sticky-container .iphone img {
  display: block;
  width: var(--iphone-width);
  margin-bottom: var(--iphone-offscreen);
}

.sticky-container .iphone.black {
  background-color: var(--iphone-black-bg);
  z-index: 10;
}

.sticky-container .iphone.black h3 {
  color: var(--iphone-black-text);
}

.sticky-container .iphone.white {
  background-color: var(--iphone-white-bg);
  z-index: 20;

  clip-path: inset(100% 0 0 0);
}

.sticky-container .iphone.white h3 {
  color: var(--iphone-white-text);
}

.sticky-container .iphone.white h3 span {
  color: var(--iphone-white-text-highlight);
}

.sticky-container .iphone.red {
  background-color: var(--iphone-red-bg);
  z-index: 30;

  /* 遮罩  向内缩小 */
  clip-path: inset(100% 0 0 0);
}

.sticky-container .iphone.red h3 {
  color: var(--iphone-red-text);
}

.sticky-container .iphone.red h3 span {
  color: var(--iphone-red-text-highlight);
}
.sticky-container.no-sticky {
  position: relative;
  overflow: visible;
}
.sticky-container.no-sticky .iphone {
  position: relative;
}
.sticky-container.no-sticky .iphone.red {
  padding-bottom: calc(var(--iphone-offscreen) * -1);
}

/* 逐行滑入部分*/
:root {
  --device-width: 770px;
  --device-height: 1336px;
  --ui-width: 640px;
}
.other-section2 {
  height: 1725px;
  background-color: #000;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.other-section2 h2 {
  color: #6e6e73;
  text-align: center;
}
.other-section2 h2 p {
  margin: 0;
  color: #fff;
}
#iphone {
  position: relative;
  width: var(--device-width);
  height: var(--device-height);
}
#hardware {
  width: 100%;
  height: 100%;
  background-image: url(https://assets.codepen.io/2002878/iphone12-5g_on_phone.jpg);
  background-size: var(--device-width) var(--device-height);
  /* 图片遮罩 */
  mask-image: url(https://assets.codepen.io/2002878/iphone12-5g_on_phone_mask.png);
  -webkit-mask-image: url(https://assets.codepen.io/2002878/iphone12-5g_on_phone_mask.png);

  mask-size: var(--device-width) var(--device-height);
  -webkit-mask-size: var(--device-width) var(--device-height);
}
#ui {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
#ui .top-ui {
  display: block;
  width: var(--ui-width);
  height: auto;
  margin: 70px auto 0;
  padding-bottom: 30px;
  border-bottom: 1px solid #222;
}
#ui ul {
  list-style: none;
  margin: 0;
  padding: 0;
  --progress: 0;
}
#ui ul li img {
  display: block;
  width: var(--ui-width);
  height: auto;
  margin: 10px auto;
  padding-bottom: 10px;
  border-bottom: 1px solid #222;
  transform: scale(calc(1.8 - (0.8 * var(--progress)))) translateY(calc(-60px * (1 - var(--progress))));
  opacity: var(--progress);
}

/* A13晶片部分 */
.other-section3 {
  background-color: #353434;
  height: 3000px;
}
#A13 .chip {
  fill: #fff;
}

#A13 .text-bg {
  fill: #fff;
}

#A13 .chip-mask {
  fill: #000;
}

#chip-section {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}
#chip-section.no-sticky {
  position: relative;
}
video {
  height: 100vh;
  width: auto;
  position: relative;
  left: 50%;
  transform: translate(-50%, 0);
}

#the-chip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  box-shadow: 0px 0px 0px 100vw #000000, 0px 0px 0px 30px black inset;
  z-index: 10;
  min-width: 100px;
  min-height: 100px;
  background-color: #000;
}

#the-chip.transparent {
  background-color: transparent;
}

#A13 {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
}

h1 {
  position: absolute;
  top: 0;
  left: 0;
  color: #fff;
  z-index: 20;
  font-family: Helvetica;
  font-size: 64px;
  letter-spacing: -1px;
  text-align: center;
  width: 100%;
  top: 50%;
  transform: translate(0, -50%);
  margin: 0;
}
/*  */
.other-section4 {
  height: 5000px;
  background-color: #131313;
}
.other-section4 #sticky {
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  overflow: hidden;
}
canvas {
  position: relative;
  margin-top: -100px;
}

p.left,
p.right {
  font-size: 28px;
  color: #fff;
  font-family: Helvetica;
  font-weight: bold;
  position: absolute;
  top: 45%;
  opacity: 0;
}

p.left {
  left: 50%;
}

p.right {
  right: 50%;
}

#loading {
  font-size: 28px;
  font-family: Helvetica;
  color: #fff;
  position: absolute;
  width: 45vw;
  text-align: center;
  z-index: 10;
  font-weight: bold;
  background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/2002878/iphone-se.01.png') no-repeat center center;
  background-size: contain;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: -50px;
  transition: 0.5s opacity ease-in-out;
  transition-delay: 2s;
}

#loading p {
  margin-top: 40%;
}

.other-section4.loaded #loading {
  opacity: 0;
}
